package org.stars.dao.params;

import java.util.HashMap;
import java.util.Map;

public class ParamVariables extends Param {
	public static ParamVariables set()
	{
		return new ParamVariables();
	}
	
	public static ParamVariables set(Map<String, String> map)
	{
		return new ParamVariables(map);
	}
	
	protected Map<String, String> variables;
	
	public ParamVariables()
	{
		this(new HashMap<String, String>());
	}
	
	public ParamVariables(Map<String, String> map)
	{
		this.type=TypeParam.VARIABLES;
		this.variables=map;
	}

	public void clear()
	{
		variables.clear();
	}

	public boolean containsVariable(String name)
	{
		return variables.containsKey(name);
	}
	
	public String getVariable(String name)
	{
		return variables.get(name);
	}
	
	public Map<String, String> getVariables() {
		return variables;
	}
	
	public String remove(String name)
	{
		return variables.remove(name);
	}
	
	public void setVariable(String name, String value)
	{
		variables.put(name, value);
	}
	
	public void setVariables(Map<String, String> variables) {
		this.variables = variables;
	}
	
	
	
}
